import React from 'react';
import { Route, IndexRedirect } from 'dva/router';
import { addRoute, addExtRoute, registerLayout } from '../framework/config/RouteHolder';
import { addMenu } from '../framework/config/MenuHolder';
import { addToolBar } from '../framework/config/ToolBarHolder';
import Index from './routes/Index';

import Login from './components/login/login-route';
import Register from './components/register/register-route';

module.exports = {

  init: function(app) {
    addRoute({
        path: '/index',
        name: '/index',
        component: Index,
      },{
          path: '/login',
          name: '/login',
          component: Login,
      },{
          path: '/register',
          name: '/register',
          component: Register,
      });

    app.model(require('./models/index'));
    app.model(require('./components/login/login-model'));
    app.model(require('./components/register/register-model'));
  }
}
